home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / DriverFamilyMatching.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  5.6 KB  |  183 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        DriverFamilyMatching.p
  3.  
  4.      Contains:    Interfaces for create native drivers NDRV
  5.  
  6.      Version:    Technology:    
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT DriverFamilyMatching;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __DRIVERFAMILYMATCHING__}
  27. {$SETC __DRIVERFAMILYMATCHING__ := 1}
  28.  
  29. {$I+}
  30. {$SETC DriverFamilyMatchingIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __NAMEREGISTRY__}
  37. {$I NameRegistry.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __CODEFRAGMENTS__}
  40. {$I CodeFragments.p}
  41. {$ENDC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {
  49.   ##############################################
  50.    Well known properties in the Name Registry
  51.   ##############################################
  52. }
  53. { CPassThru }
  54. {
  55.   #########################################################
  56.    Descriptor for Drivers and NDRVs
  57.   #########################################################
  58. }
  59.     QuickTime 3.0: "DriverType" has a name collision with cross-platform code.
  60.     Use Mac prefix to avoid collision 
  61. }
  62. { Driver Typing Information Used to Match Drivers With Devices }
  63.  
  64. TYPE
  65.     MacDriverTypePtr = ^MacDriverType;
  66.     MacDriverType = RECORD
  67.         nameInfoStr:            Str31;                                    {  Driver Name/Info String }
  68.         version:                NumVersion;                                {  Driver Version Number }
  69.     END;
  70.  
  71. {$IFC TARGET_OS_MAC }
  72.     DriverType                            = MacDriverType;
  73.     DriverTypePtr                         = ^DriverType;
  74. {$ENDC}  {TARGET_OS_MAC}
  75.  
  76. { OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment }
  77.     RuntimeOptions                        = OptionBits;
  78.  
  79. CONST
  80.     kDriverIsLoadedUponDiscovery = $00000001;                    {  auto-load driver when discovered }
  81.     kDriverIsOpenedUponLoad        = $00000002;                    {  auto-open driver when loaded }
  82.     kDriverIsUnderExpertControl    = $00000004;                    {  I/O expert handles loads/opens }
  83.     kDriverIsConcurrent            = $00000008;                    {  supports concurrent requests }
  84.     kDriverQueuesIOPB            = $00000010;                    {  device manager doesn't queue IOPB }
  85.     kDriverIsLoadedAtBoot        = $00000020;                    {  Driver is loaded at the boot time  }
  86.     kDriverIsForVirtualDevice    = $00000040;                    {  Driver is for a virtual Device  }
  87.     kDriverSupportDMSuspendAndResume = $00000080;                {  Driver supports Device Manager Suspend and Resume command  }
  88.  
  89.  
  90. TYPE
  91.     DriverOSRuntimePtr = ^DriverOSRuntime;
  92.     DriverOSRuntime = RECORD
  93.         driverRuntime:            RuntimeOptions;                            {  Options for OS Runtime }
  94.         driverName:                Str31;                                    {  Driver's name to the OS }
  95.         driverDescReserved:        ARRAY [0..7] OF UInt32;                    {  Reserved area }
  96.     END;
  97.  
  98. { OS Service Information Used To Declare What APIs a Driver Supports }
  99.     ServiceCount                        = UInt32;
  100.     DriverServiceInfoPtr = ^DriverServiceInfo;
  101.     DriverServiceInfo = RECORD
  102.         serviceCategory:        OSType;                                    {  Service Category Name }
  103.         serviceType:            OSType;                                    {  Type within Category }
  104.         serviceVersion:            NumVersion;                                {  Version of service }
  105.     END;
  106.  
  107.     DriverOSServicePtr = ^DriverOSService;
  108.     DriverOSService = RECORD
  109.         nServices:                ServiceCount;                            {  Number of Services Supported }
  110.         service:                ARRAY [0..0] OF DriverServiceInfo;        {  The List of Services (at least one) }
  111.     END;
  112.  
  113. { Categories }
  114.  
  115. CONST
  116.     kServiceCategoryDisplay        = 'disp';                        {  Display Manager }
  117.     kServiceCategoryOpenTransport = 'otan';                        {  Open Transport }
  118.     kServiceCategoryBlockStorage = 'blok';                        {  Block Storage }
  119.     kServiceCategoryNdrvDriver    = 'ndrv';                        {  Generic Native Driver }
  120.     kServiceCategoryScsiSIM        = 'scsi';                        {  SCSI  }
  121.     kServiceCategoryFileManager    = 'file';                        {  File Manager  }
  122.     kServiceCategoryIDE            = 'ide-';                        {  ide  }
  123.     kServiceCategoryADB            = 'adb-';                        {  adb  }
  124.     kServiceCategoryPCI            = 'pci-';                        {  pci bus  }
  125.                                                                 {  Nu Bus  }
  126.     kServiceCategoryDFM            = 'dfm-';                        {  DFM  }
  127.     kServiceCategoryMotherBoard    = 'mrbd';                        {  mother Board  }
  128.     kServiceCategoryKeyboard    = 'kybd';                        {  Keyboard  }
  129.     kServiceCategoryPointing    = 'poit';                        {  Pointing  }
  130.     kServiceCategoryRTC            = 'rtc-';                        {  RTC  }
  131.     kServiceCategoryNVRAM        = 'nram';                        {  NVRAM  }
  132.     kServiceCategorySound        = 'sond';                        {  Sound (1/3/96 MCS)  }
  133.     kServiceCategoryPowerMgt    = 'pgmt';                        {  Power Management  }
  134.     kServiceCategoryGeneric        = 'genr';                        {  Generic Service Category to receive general Events  }
  135.  
  136. { Ndrv ServiceCategory Types }
  137.     kNdrvTypeIsGeneric            = 'genr';                        {  generic }
  138.     kNdrvTypeIsVideo            = 'vido';                        {  video }
  139.     kNdrvTypeIsBlockStorage        = 'blok';                        {  block storage }
  140.     kNdrvTypeIsNetworking        = 'netw';                        {  networking }
  141.     kNdrvTypeIsSerial            = 'serl';                        {  serial }
  142.     kNdrvTypeIsParallel            = 'parl';                        {  parallel  }
  143.     kNdrvTypeIsSound            = 'sond';                        {  sound }
  144.     kNdrvTypeIsBusBridge        = 'brdg';
  145.  
  146.  
  147. TYPE
  148.     DriverDescVersion                    = UInt32;
  149. {    The Driver Description }
  150.  
  151. CONST
  152.     kInitialDriverDescriptor    = 0;
  153.     kVersionOneDriverDescriptor    = 1;
  154.  
  155.     kTheDescriptionSignature    = 'mtej';
  156.     kDriverDescriptionSignature    = 'pdes';
  157.  
  158.  
  159.  
  160. TYPE
  161.     DriverDescriptionPtr = ^DriverDescription;
  162.     DriverDescription = RECORD
  163.         driverDescSignature:    OSType;                                    {  Signature field of this structure }
  164.         driverDescVersion:        DriverDescVersion;                        {  Version of this data structure }
  165.         driverType:                MacDriverType;                            {  Type of Driver }
  166.         driverOSRuntimeInfo:    DriverOSRuntime;                        {  OS Runtime Requirements of Driver }
  167.         driverServices:            DriverOSService;                        {  Apple Service API Membership }
  168.     END;
  169.  
  170.  
  171.  
  172. {$ALIGN RESET}
  173. {$POP}
  174.  
  175. {$SETC UsingIncludes := DriverFamilyMatchingIncludes}
  176.  
  177. {$ENDC} {__DRIVERFAMILYMATCHING__}
  178.  
  179. {$IFC NOT UsingIncludes}
  180.  END.
  181. {$ENDC}
  182.